function date(){
	var date=getDate();
	var day=getDay();
	
	var now = new Date(); 
	var d=now.getDay();
	if(d==0 || d==6) day="<font color='#ff0000'>"+ day +"</font>";
	return  date+ "&nbsp;"+ day ;
}


function time(){
	var t=getTime(":");
//	document.getElementById('nowTime').innerHTML=t;
	$(".time").html(t);
    setTimeout("time()",500);
}


var yearText="年";
var monthText="月";
var dayText="日";

function getTime(separator)
{
	if(separator==undefined) separator=":";
	
	var now=new Date();
	var h=now.getHours();
	var m=now.getMinutes();
	var s=now.getSeconds();
	// add a zero in front of numbers<10
	m=_add0(m);
	s=_add0(s);
	// var time=h+":"+m+":"+s;
	var time=h+separator+m+separator+s+"&nbsp;";
	return time;
}

function getDate(separator)
{
	if(separator==undefined) separator="-";
	
	var now = new Date(); 
	// var yy = now.getYear(); 
	var yy = now.getFullYear(); 
	var mm = now.getMonth()+1; 
	var dd=now.getDate();
	
	mm=_add0(mm);
	dd=_add0(dd);
	
// 	var date= yy+yearText+mm+monthText+dd+dayText;

	var date= yy+separator+mm+separator+dd;
	return date;
} 

function getDay(){
	var now = new Date(); 
	var d=now.getDay();
	
	var day = new Array(); 
	day[0] = "日"; 
	day[1] = "一"; 
	day[2] = "二"; 
	day[3] = "三"; 
	day[4] = "四"; 
	day[5] = "五"; 
	day[6] = "六"; 
	
	return "星期"+day[d];
}


function _add0(i) {
	if (i < 10)  i = "0" + i;
	return i
}